-- Where To?, Copyright by Mac Help Co., January 1988
-- by Chris Hostetter, Mac Help Co., 1800 East Market Street
-- Long Beach, CA 90805, (213) 428-7414
-- The script for this button is copyrighted and may not be
-- used without the written permission of the author (above).
end copyright
on mouseUp
Global ReturnID
if the optionKey is down then
if ReturnID is not empty then go to ReturnID
exit mouseUp
end if
put the ID of this card into ReturnID
Answer "Where do you wish to go?" with "HOME" or "Card #" or "Other"
if it is "Home" then go home
if it is "Card #" then
ask "Enter the card number you wish to go to?" with the number of this card
if it is empty then exit mouseUp
go to card it
exit mouseUp
end if
if it is "Other" then
Ask "[ Any, Mid, First, Second, Last, Pop, All ]"
if it is empty then exit mouseUp
if it contains "Pop" then
pop card
exit mouseUp
end if
if it contains "All" then
show all cards
exit mouseUp
end if
set loc of message box to 20,-50
put "Go" && it into message box
hide message box
set loc of message box to 20,300
do message box
end if
end mouseUp
-- part 2 (field)
-- low flags: 01
-- high flags: 0004
-- rect: left=314 top=22 right=37 bottom=374
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: See Script
----- HyperTalk script -----
on mouseUp
edit script of card button "Where to?"
end mouseUp
-- part contents for background part 8
----- text -----
Card 20 of 20
-- part contents for background part 9
----- text -----
WHERE TO
This button can be a useful alternative to the regular home button because it is more flexible. You can go to a card number, or Home, or the last card, mid card, any card, first, second, third card, etc.
This particular Icon picture is not included with HyperCard, so you will have to paste the resource ICON into the stack you are using.
If you click other, and enter information about where you wish to go, you can repeat the same command again by hitting the RETURN or ENTER key. (Useful if you had entered to go to ANY card to go to cards randomly)
If you wish to return to where you were when you first clicked the button, simply hold the option key down while clicking the button.